import { ApiCall } from "tsrpc";
import { Global, GNum } from "../../models/Global";
import { ReqAddPost, ResAddPost } from "../../shared/protocols/postApi/PtlAddPost";

export async function ApiDelPost(call: ApiCall<ReqAddPost, ResAddPost>) {
    // let op = await Global.collection('Post').insertOne({
    //     ...call.req.newPost,
    //     create: {
    //         uid: 'xxx',
    //         time: new Date()
    //     },
    //     visitedNum: 0
    // });

    // call.succ({
    //     insertedId: op.insertedId.toHexString()
    // })

    // let op = await Gnum
    let str = GNum + '';
    console.log("看看值", str);
    call.succ({
        // insertedId:,
        insertedId: str,
    })
}